using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Entities;
using BUS;
using Utility;
using System.Text;

public partial class Admin_NguoiDung_ThemDoanhNghiep : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btn_Add_Click(object sender, EventArgs e)
    {
        try
        {
            tbDoanhNghiep doanhnghiep = new tbDoanhNghiep();
            doanhnghiep.TenDN = txt_TenDoanhNghiep.Text;
            doanhnghiep.DiaChi = txt_DiaChi.Text;
            doanhnghiep.DienThoai = txt_DienThoai.Text;
            doanhnghiep.Email = txt_Email.Text;
            doanhnghiep.MatKhau = txt_MatKhau.Text;
            doanhnghiep.MaTK = txt_MaTK.Text;
            tbDoanhNghiepBUS.Insert(doanhnghiep);
        }
        catch (Exception)
        {
            Response.Redirect("~/Admin/NguoiDung/DanhSachDoanhNghiep.aspx");
        }
        Response.Redirect("~/Admin/NguoiDung/DanhSachDoanhNghiep.aspx");
    }
}
